import { defHttp } from '@/utils/http/axios'
import { GetAccountInfoModel } from '../demo/model/accountModel'

enum Api {
  GET_MANUAL_ENTRY_LIST = '/custom/data/page',
  UPDATE_MANUAL_ENTRY_RECORD = '/custom/data/addVal',
  DELETE_MANUAL_ENTRY_RECORD = '/custom/data/removeVal',
  ADD_MANUAL_ENTRY_RECORD = '/custom/data/add',
}

export const getManualEntryList = (params) =>
  defHttp.get<GetAccountInfoModel>({ url: Api.GET_MANUAL_ENTRY_LIST, params })
export const deleteManualEntryList = (data) =>
  defHttp.post<GetAccountInfoModel>({ url: Api.DELETE_MANUAL_ENTRY_RECORD, data })
export const updateManualEntryRecord = (data) =>
  defHttp.post<GetAccountInfoModel>({ url: Api.UPDATE_MANUAL_ENTRY_RECORD, data })
export const addManualEntryRecord = (data) =>
  defHttp.post<GetAccountInfoModel>({ url: Api.ADD_MANUAL_ENTRY_RECORD, data })
export const recordMonthDataCreate = (data) =>
  defHttp.post<GetAccountInfoModel>({ url: '/recordMonthData/create', data })
export const recordMonthDataUpdate = (data) =>
  defHttp.put<GetAccountInfoModel>({ url: '/recordMonthData/update', data })
export const recordMonthDataDelete = (params) =>
  defHttp.post<GetAccountInfoModel>({ url: '/recordMonthData/delete', params })
export const recordMonthDataList = (params) =>
  defHttp.post<GetAccountInfoModel>({ url: '/recordMonthData/list', params })